package com.alex.service;

import java.util.List;

import com.alex.DAO.IGoodsDAO;
import com.alex.service.IGoodsService;
import com.alex.entity.Goods;

public class GoodsService implements IGoodsService {
	protected IGoodsDAO goodsDAO;
	
	public List getGoodsByCatalogid(Integer catalogid){
		return goodsDAO.getGoodsByCatalogid(catalogid);
	}
	public List getGoodsByCatalogidPaging(Integer catalogid,int currentPage,int pageSize){
		return goodsDAO.getGoodsByCatalogidPaging(catalogid, currentPage, pageSize);
	}
	public int getTotalByCatalog(Integer catalogid){
		return goodsDAO.getTotalByCatalog(catalogid);
	}

	public IGoodsDAO getGoodsDAO() {
		return goodsDAO;
	}

	public void setGoodsDAO(IGoodsDAO goodsDAO) {
		this.goodsDAO = goodsDAO;
	}
	public Goods getGoodsById(Integer goodsid){
		return goodsDAO.getGoodsById(goodsid);
	}
    public List getRequiredGoodsByHql(String hql) {
		
		return goodsDAO.getRequiredGoodsByHql(hql);
	}
    public List getNewGoods(){
    	return goodsDAO.getNewGoods();
    }
}
